This method calculates the Plus Directional Movement.
var PLUSDM(period, highPricesArray, lowPricesArray, calculatedDataArray);
period
Period integer value.
highPricesArray
Array object filled with high prices.
lowPricesArray
Array object filled with low prices.
calculatedDataArray
Empty Array object that will be filled with calculated data.
Returns true if calculation was completed successfully, or false otherwise.
The following example demonstrates how to use PLUSDM method.
function calculate(beginIndex, endIndex)
{
var period = 15;
var highPricesArray = new Array();
var lowPricesArray = new Array();
//populate arrays..
..
..
..
var calculatedDataArray = new Array();
var rc = TechnicalAnalysis.PLUSDM(period, highPricesArray, lowPricesArray, calculatedDataArray);
}
Copyright © 2006-2009 ActiveTick LLC